#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;


class MyHashSet {
public:
    /** Initialize your data structure here. */
    MyHashSet() {

    }
    
    void add(int key) {
        if(V.empty()){
            V.push_back(key);
        }
        else{
            if(contains(key)){
                return;
            }
            else{
                V.push_back(key);
            }
        }
    }
    
    void remove(int key) {
        if(contains(key)){
            V.erase(K);
        }
    }
    
    /** Returns true if this set contains the specified element */
    bool contains(int key) {
        auto iter = find(V.begin(),V.end(),key);
        if(iter==V.end()){
            return false;
        }
        else{
            K = iter;
            return true;
        }

    }
public:
    vector<int> V;
    vector<int>::iterator K;
};

/**
 * Your MyHashSet object will be instantiated and called as such:
 * MyHashSet* obj = new MyHashSet();
 * obj->add(key);
 * obj->remove(key);
 * bool param_3 = obj->contains(key);
 */